interface KHTMLElement {
    /**
     * 切换元素显示状态
     * @param visible <'display'> 显示属性 @see Evisible
     * @param detail 事件信息
     * @returns 当前元素对象
     */
    swap(visible?: Evisible, detail?: any): KHTMLElement;
}
{
    Object.defineProperty(KHTMLElement.prototype, 'swap', {
        writable: false,
        configurable: false,
        enumerable: false,
        value: function (visible = Evisible.display, detail?: any) {
            if (arguments.length === 1) {
                return this.isShow(visible) ? this.hide(visible) : this.show(visible);
            } else {
                return this.isShow(visible, detail) ? this.hide(visible, detail) : this.show(visible, detail);
            }
        }
    });
}
